#include "httplib.h"
#include "log.hpp"
const string base_html="./root";
int main(int argc,char* argv[])
{
    int port=8080;
    Log log;

    if(argc==2)
    {
        port=stoi(argv[1]);
        log(INFO,"指定端口：%d\n",port);
    }
    httplib::Server svr;

    svr.set_base_dir(base_html.c_str());
    svr.Get("/s", [&](const httplib::Request&req,httplib::Response& res){
        res.set_content("hello world","text/plain;charset=utf-8");
    });
    svr.listen("0.0.0.0",port);
    return 0;
}    

